package demo;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import org.junit.jupiter.api.Test;

import java.io.IOException;

//import static cn.hutool.core.lang.Console.log;

public class JSONPDemo {

    @Test
    void test1() throws IOException {

        Document doc = Jsoup.connect("https://wiki.mbalib.com/wiki/").get();
        System.out.println(doc.title());
        Elements newsHeadlines = doc.select("#contentB b a");
        for (Element headline : newsHeadlines) {
            System.out.printf("%s\n\t%s",
                    headline.attr("title"), headline.absUrl("href"));
            System.out.println();
        }
    }
}
